package com.ruoyi.utils;

/**
 * 分页查询条件
 *
 * @author liuliya
 */
public class PageQuery {

    private Integer pageNo;
    private Integer pageSize;
    private String ascs;
    private String descs;

    public PageQuery(Builder builder) {
        this.pageNo = builder.pageNo;
        this.pageSize = builder.pageSize;
        this.ascs = builder.ascs;
        this.descs = builder.descs;
    }

    public static class Builder {

        private Integer pageNo;
        private Integer pageSize;
        private String ascs;
        private String descs;

        public Builder pageNo(Integer pageNo) {
            this.pageNo = pageNo;
            return this;
        }

        public Builder pageSize(Integer pageSize) {
            this.pageSize = pageSize;
            return this;
        }

        public Builder ascs(String ascs) {
            this.ascs = ascs;
            return this;
        }

        public Builder descs(String descs) {
            this.descs = descs;
            return this;
        }

        public PageQuery build() {
            return new PageQuery(this);
        }

    }

    public static Builder builder() {
        return new Builder();
    }

    public Integer getPageNo() {
        return pageNo;
    }

    public void setPageNo(Integer pageNo) {
        this.pageNo = pageNo;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public String getAscs() {
        return ascs;
    }

    public void setAscs(String ascs) {
        this.ascs = ascs;
    }

    public String getDescs() {
        return descs;
    }

    public void setDescs(String descs) {
        this.descs = descs;
    }

    @Override
    public String toString() {
        return "Query{" +
                "pageNo=" + pageNo +
                ", pageSize=" + pageSize +
                ", ascs='" + ascs + '\'' +
                ", descs='" + descs + '\'' +
                '}';
    }

}
